Skip to main content

Dynamic Weights

InterSwap introduces a new mechanic for the dynamic change of tokens weights during single-asset liquidity provision/removing. Adding Liquidity, proportionally increases the weight of the asset and vice versa: removing liquidity decreases the weight. Liquidity provision/removing does not affect the quotes. Such a mechanic eliminates the possibility of draining the pool. Let's take an example of such initial pool with equal weights:

AssetReserveWeight Points
BNB200001000
ETH50001000
AVAX450001000

Total Weight: 3000

We are adding liquidity with amount of 20 ETH. How much weigh points we should add to ETH?

price per point = reserve / points count.

p=a/(r/t)p=a /(r / t)

Where:

  • pp - points to be added or reduced.
  • aa - amount of tokens added or removed.
  • rr - current reserve of token.
  • tt - total points.

In our example:

points = 20 / (5000 / 1000) = 4

AssetReserveWeight Points
BNB200001000
ETH50201004
AVAX450001000

Total Weight: 3004